# coding: utf-8

from app.json.mysql.base import Base as BaseJson
from app.model.mysql.gift import Gift as GiftModel


class Gift(BaseJson):
    def __init__(self, model: GiftModel):
        self.id = model.id
        self.icon = model.icon
        self.title = model.title
        self.num = model.num
        self.created_time = str(model.created_time)
        self.updated_time = str(model.updated_time)
        self.is_delete = model.is_delete
        self.cash = model.cash
        self.can_out = model.can_out
        self.t_id = model.t_id
        self.is_sale = model.is_sale
        self.is_safebox = model.is_safebox